import React, { Component, PropTypes } from 'react'
import { Icon } from 'antd-mobile'
import { hashHistory } from 'react-router'

export default class ReturnHeader extends Component {
  render() {
    const { title }= this.props
    return (
      <header className="cm-return-header">
      <span
        className="-left"
        onClick={
          () => {
            hashHistory.goBack()
          }
        }
      >
        <img src={require('../../statics/images/back.png')} />
      </span>
      <span className={`-title`}>{title}</span>
      <span className="-right"></span>
      </header>
      )
  }
}

ReturnHeader.propTypes = {
  title: PropTypes.string.isRequired,
}